package model

import "nt-order/conf"

type Warehouse struct {
	Id   int64
	Name string
}

func (m *Warehouse) GetWarehouse() []Warehouse {
	db := conf.GetDb("warehouse")
	list := make([]Warehouse, 0)
	err := db.Where("state=?", 1).Find(&list)
	if err != nil {
		panic(err)
	}
	return list
}
